﻿using DBUtility;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace EMR.SpecialPage
{
    public partial class FormBA : Form
    {
        string bah;
        string zyh;
        private DbHelperOra sql_help;
        private UC_PAF uc_paf;
        public FormBA(string zyhTmp,string bahTmp,UC_PAF uc_tmp)
        {
            InitializeComponent();
            sql_help = new DbHelperOra();
            bah = bahTmp;
            zyh = zyhTmp;
            textBox_old.Text = bah;
            uc_paf = uc_tmp;
        }

        private void buttonOK_Click(object sender, EventArgs e)
        {
            string bah_old = this.textBox_old.Text;
            string bah_new = this.textBox_New.Text;
            string sql_patient = "update patients set PA_BA_TYPE=1,PA_BA_NEW='" + bah_new + "' where pa_his_beinhospital_code='" + zyh + "'";
            sql_help.ExecuteUpdateSql(sql_patient);
            uc_paf.setTextBox3New(bah_new);
        }
    }
}
